<html>
<head>
    <title>Edit</title>
</head>
<body>
{% include 'top.html' %}
    <h1>Edycja {{ form.instance.first_name }}</h1>

    <form action="" method="post">
        <table>
            {{ form.as_table }}
        </table>
        <input type="submit" name="Submit" value="Zapisz">
        <input type="submit" name="Cancel" value="Anuluj">

    </form>
	<p/>
	<h2>Kontakty do {{ form.instance.first_name }}</h2>
	<p/>

	<form action="/del-contacts-to-person/{{ form.instance.id }}/" method="post">
	{% for item in children_list %}
		<input type="checkbox" name="checkbox" value="{{ item.id }}"/>
		{{ item.type }}: {{ item.value }}
		<a href="{{ child_template }}{{form.instance.id}},{{ item.id }}">Edit</a>
		<br/>
	{% endfor %}
	<br/>
	<input type="submit" name="DeleteChildren" value="Usun kontakty"/>
	</form>
	<p/>
    <button onclick="window.location='/new-contact-to-person/{{ form.instance.id }}/'">
    	Nowy kontakt do {{ form.instance }}
    </button>
</body>
</html>
